function cp(p:string|number){
    if(typeof p==='string'){
        return p+p;
    }else{
        return p+p;
    }
}

console.log(cp('abc'))
console.log(cp(123))
interface Shape{
    area():number;
}
interface Color{
    color:string
}
class RedCircle implements Shape,Color{
    radius:number;
    color:string='red';
    area(){
        return 3.14*2*2;
    }
}
var c:Shape&Color=new RedCircle();
console.log(c.area(),c.color)


type Align="centerX"|"centerY"

function descAlig(align:Align){
    if(align==="centerX"){
        console.log("centerX")
    }else{
        console.log("centerY")
    }
}
descAlig("centerX")

type BaseAny=number|string|boolean|null|undefined;
var base:BaseAny=1
var base2:BaseAny="demo"
var base3:BaseAny=true
